Creates a InteractionObjective object, which may then be used to be added to the Interaction.Objectives list.
Parent Type: LearningDataModel
Namespace: Microsoft.LearningComponents.DataModel
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public InteractionObjective CreateInteractionObjective () |
A new InteractionObjective object associated with this LearningDataModel.
| Exception type | Condition |
| InvalidOperationException | Thrown if this LearningDataModel object cannot be written to. |
The following example demonstrates creating a new interaction objective and adding it to the Interaction.Objectives collection.
| C# |
LearningSession session = ... ; // get LearningSession object InteractionObjective o = session.CurrentActivityDataModel.CreateInteractionObjective(); o.Id = "objective1"; // A unique identifier is required before this is added to the list session.CurrentActivityDataModel.Interactions[0].Objectives.Add(o); |